using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Beta_fundies_controls_admin_Archives_AddArchive : System.Web.UI.UserControl
{
    public event EventHandler ArchiveCreated;
    protected void btnAddArchive_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            DAL.Archive myArchive = new DAL.Archive();
            myArchive.Title = txtArchive.Text;

            DAL.Archives.Add(myArchive);

            txtArchive.Text = "";

            if (ArchiveCreated != null)
            {
                ArchiveCreated(this, new EventArgs());
            }
        }
    }
}
